<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
   <!-- header -->
	<div class="header">
		<div class="top_nav">
			<div class="container clear">
				
				<c:choose>
					<c:when test="${session_user!=null }">
						欢迎您,<font color=red>${session_user.name}</font>
						|<a href="${pageContext.request.contextPath}/cityController?_method=loginOut">退出系统</a>
						
						<c:if test="${session_user.role ==1}">
							<a class="left" href="">【进入后台】</a>
						</c:if>
					</c:when>
					<c:otherwise>
						<a href="${pageContext.request.contextPath}/cityController?_method=toLogin">登录</a>
					</c:otherwise>
				</c:choose>
				
				<span class="right">
					<a href="#">设为主页</a>
					<font>-</font>
					<a href="#">收藏本页</a>
					<font>-</font>
					<a href="#">联系我们</a>
				</span>
			</div>
		</div>
		<div class="nav">
			<div class="container clear">
				<a href="index.html" class="left brand"><img src="${pageContext.request.contextPath}/images/heading.png" alt=""></a>
				<div class="nav_bar right">
					<p>
						<a href="index.html">首<i></i>页</a>
						<c:forEach items="${types}" var="type" begin="0" end="5">
							<a href="${pageContext.request.contextPath}/cityController?_method=home&tid=${type.id}">${type.name}</a>
						</c:forEach>
					</p>
					<p>
						<c:forEach items="${types}" var="type" begin="6" >
							<a href="${pageContext.request.contextPath}/cityController?_method=home&tid=${type.id}">${type.name}</a>
						</c:forEach>
					</p>
					
				</div>
			</div>
		</div>
	</div>
	<!-- header end-->
